<?php

//1. find the session
session_start();
//2. Unset all varialbes 
$_SESSION = array();

//4. destroy session
session_destroy();

//redirect
header('location: index.php');
?>